﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Light.Utility
{
    /// <summary>
    /// 消息提示框
    /// </summary>
    public class MsgBox
    {


        /// <summary>
        /// 删除提示框 Yes Or No
        /// </summary>
        /// <returns></returns>
        public static DialogResult Delete()
        {

            return Delete("确定要删除吗?");
        }


        /// <summary>
        /// 删除提示框 Yes Or No
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static DialogResult Delete(string msg)
        {

            return MessageBox.Show(msg, "删除提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        /// <summary>
        /// 信息提示 OK
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static DialogResult Information(string msg)
        {
            return MessageBox.Show(msg, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        /// <summary>
        /// 操作确认 Yes Or  No
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static DialogResult Question(string msg)
        {
            return MessageBox.Show(msg, "操作确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }


        /// <summary>
        /// 警告 OK
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static DialogResult Warning(string msg)
        {
            return MessageBox.Show(msg, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }

    }
}
